package com.lwz.proxy;

public class TestProxy {

	public static void main(String[] args) {
		HumenServiceProxy proxy = HumenServiceProxy.getInstance();
		proxy.waitor();
		proxy.watering();
		System.out.println("-------------静态代理----------------");
		ProxyHandler proxyHandler = new ProxyHandler();
		 //绑定该类实现的所有接口
		HumenService humenService = (HumenService)proxyHandler.bind(new HumenServiceImpl());
		humenService.waitor();
		humenService.watering();
	}

}
